package study.springboot.starter.tacker.feign;

import feign.RequestInterceptor;
import feign.RequestTemplate;
import lombok.extern.slf4j.Slf4j;
import study.springboot.starter.tacker.Headers;
import study.springboot.starter.tacker.TrackerKeys;

@Slf4j
public class FeignHeaderInterceptor implements RequestInterceptor {

    @Override
    public void apply(RequestTemplate template) {
        template.header(Headers.X_REQUEST_ID, TrackerKeys.get());
    }
}
